package io;

import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.net.ServerSocket;
import java.net.Socket;

public class AioClient {

    private int port;

    public AioClient(int port) {
        this.port = port;
    }

    public void start() throws IOException {
        Socket socket = new Socket("localhost", port);
        OutputStream outputStream = socket.getOutputStream();
        byte[] bytes = "hello server!".getBytes();
        outputStream.write(bytes,0,bytes.length);
        socket.close();
    }
}
